module.exports = (app) => {
  const DataTypes = app.Sequelize;
  return app.model.define('t_accctrlinfo', {
    tac_index: {
      autoIncrement: true,
      type: DataTypes.INTEGER,
      allowNull: false,
      primaryKey: true
    },
    tac_pdi_index: {
      type: DataTypes.INTEGER,
      allowNull: false,
      comment: "设备对应的ID"
    },
    tac_JobNum: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "卡号"
    },
    tac_name: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "姓名"
    },
    tac_gender: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "性别"
    },
    tac_position: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "职位"
    },
    created_at: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "创建时间"
    },
    updated_at: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "更新时间"
    }
  }, {
    tableName: 't_accctrlinfo',
    timestamps: false,
    underscored: false,
    indexes: [
      {
        name: "PRIMARY",
        unique: true,
        using: "BTREE",
        fields: [
          { name: "tac_index" },
        ]
      },
    ]
  });
};
